//统一管理api
import requests from "./request";

//注册的接口
export const reqUserRegister = (data)=>requests({url:'/save',data,method:'post'});

//登录接口
export const reqUserLogin = (data)=>requests({url:`/login2`,method:'post',data});

//修改密码接口
export const reqPwdUpdata = (data)=>requests({url:`/updatePwd`,method:'post',data});

//获取所有商品信息
export const reqGoodsList = ()=>requests({url:`/getAllGoods`,method:'post'});

//加入购物车
export const jiaShopCart = (data)=>requests({url:`/shopcar`,method:'post',params:data});

//加入收藏夹
export const jiaStar = (data)=>requests({url:`/favorites`,method:'post',params:data});

//获取购物车
export const reqShopCart = ()=>requests({url:`/shopcar`,method:'get'});

//删除购物车
export const delShopCart = (data)=>requests({url:`/shopcar`,method:'delete',params:data});

//在购物车下单
export const orderShopCart = (data)=>requests({url:`/shopcar/order`,method:'post',data});

//修改商品状态
export const reqStateUpdata = (data)=>requests({url:`/updateGoods`,method:'post',data});

//获取用户信息
export const reqGetUser = (data)=>requests({url:`/selectUserByUid`,method:'get',params:data});

//获取TOKEN数据
export const reqtokenInfo=()=>requests({url:'/satoken/tokenInfo',method:'post'})

//获取商品分类
export const reqCategoryList = (data)=>requests({url:`/axeTypes`,method:'get'});

